#include "QRectangle.h"

//Left
float QRectangle::GetX()
{
	return _x;
}

//Bottom
float QRectangle::GetY()
{
	return _y;
}

//Right
float QRectangle::GetX2()
{
	return _x + _width;
}

//Top
float QRectangle::GetY2()
{
	return _y + _height;
}

float QRectangle::GetWidth()
{
	return _width;
}
float QRectangle::GetHeight()
{
	return _height;
}
bool QRectangle::Intersect(QRectangle a)
{
	return (this -> GetX() < a.GetX2()
		&& this -> GetY() < a.GetY2()
		&& this -> GetX2() > a.GetX()
		&& this -> GetY2() > a.GetY());
}